package com.ht.medicaltreatment.adapter

import android.os.Bundle
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.fragment.app.FragmentManager
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.blankj.utilcode.util.FragmentUtils
import com.blankj.utilcode.util.GsonUtils
import com.ht.medicaltreatment.bean.AllCentrifugeBean
import com.ht.medicaltreatment.fragment.CentrifugeFragment

class CentrifugeFragmentAdapter(activit:FragmentActivity) : FragmentStateAdapter(activit) {

    private val fragments = arrayListOf<CentrifugeFragment>()

    fun setData(list:MutableList<CentrifugeFragment>){
        fragments.clear()
        fragments.addAll(list)
        notifyDataSetChanged()
    }

    override fun getItemCount() = fragments.size

    override fun createFragment(position: Int) = fragments[position]

}
